using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace WindowsGame
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class GameStateComponent : Microsoft.Xna.Framework.GameComponent
    {
        public enum GameStates
        {
            Play,
            Menu,
            HighScore
        }
        GameStates currentGameState;
        GameStates oldGameState;

        public GameStateComponent(Game game)
            : base(game)
        {
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            //Set default game state
            currentGameState = GameStates.Menu;

            base.Initialize();
        }

        public override void Update(GameTime gameTime)
        {
            oldGameState = currentGameState;
            base.Update(gameTime);
        }


        public GameStates GetCurrentGameState() { return currentGameState; }

        public GameStates GetOldGameState() { return oldGameState; }

        public void SetGameState(GameStates value) { currentGameState = value; }
    }
}
